home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / lisp / stk-3.002 / stk-3 / STk-3.1 / Tcl / tclInt.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-07-13  |  42.6 KB  |  1,076 lines

  1. /*
  2.  * tclInt.h --
  3.  *
  4.  *    Declarations of things used internally by the Tcl interpreter.
  5.  *
  6.  * Copyright (c) 1987-1993 The Regents of the University of California.
  7.  * Copyright (c) 1994-1996 Sun Microsystems, Inc.
  8.  *
  9.  * See the file "license.terms" for information on usage and redistribution
  10.  * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  11.  *
  12.  * SCCS: @(#) tclInt.h 1.200 96/04/11 17:24:12
  13.  */
  14.  
  15. #ifndef _TCLINT
  16. #define _TCLINT
  17.  
  18. /*
  19.  * Common include files needed by most of the Tcl source files are
  20.  * included here, so that system-dependent personalizations for the
  21.  * include files only have to be made in once place.  This results
  22.  * in a few extra includes, but greater modularity.  The order of
  23.  * the three groups of #includes is important.  For example, stdio.h
  24.  * is needed by tcl.h, and the _ANSI_ARGS_ declaration in tcl.h is
  25.  * needed by stdlib.h in some configurations.
  26.  */
  27.  
  28. #include <stdio.h>
  29.  
  30. #ifndef _TCL
  31. #include "tcl.h"
  32. #endif
  33. #ifndef _REGEXP
  34. #include "tclRegexp.h"
  35. #endif
  36.  
  37. #include <ctype.h>
  38. #ifdef NO_LIMITS_H
  39. #   include "compat/limits.h"
  40. #else
  41. #   include <limits.h>
  42. #endif
  43. #ifdef NO_STDLIB_H
  44. #   include "compat/stdlib.h"
  45. #else
  46. #   include <stdlib.h>
  47. #endif
  48. #ifdef NO_STRING_H
  49. #include "compat/string.h"
  50. #else
  51. #include <string.h>
  52. #endif
  53. #if defined(__STDC__) || defined(HAS_STDARG)
  54. #   include <stdarg.h>
  55. #else
  56. #   include <varargs.h>
  57. #endif
  58.  
  59. /*
  60.  *----------------------------------------------------------------
  61.  * Data structures related to variables.   These are used primarily
  62.  * in tclVar.c
  63.  *----------------------------------------------------------------
  64.  */
  65.  
  66. /*
  67.  * The following structure defines a variable trace, which is used to
  68.  * invoke a specific C procedure whenever certain operations are performed
  69.  * on a variable.
  70.  */
  71.  
  72. typedef struct VarTrace {
  73.     Tcl_VarTraceProc *traceProc;/* Procedure to call when operations given
  74.                  * by flags are performed on variable. */
  75.     ClientData clientData;    /* Argument to pass to proc. */
  76.     int flags;            /* What events the trace procedure is
  77.                  * interested in:  OR-ed combination of
  78.                  * TCL_TRACE_READS, TCL_TRACE_WRITES, and
  79.                  * TCL_TRACE_UNSETS. */
  80.     struct VarTrace *nextPtr;    /* Next in list of traces associated with
  81.                  * a particular variable. */
  82. } VarTrace;
  83.  
  84. /*
  85.  * When a variable trace is active (i.e. its associated procedure is
  86.  * executing), one of the following structures is linked into a list
  87.  * associated with the variable's interpreter.  The information in
  88.  * the structure is needed in order for Tcl to behave reasonably
  89.  * if traces are deleted while traces are active.
  90.  */
  91.  
  92. typedef struct ActiveVarTrace {
  93.     struct Var *varPtr;        /* Variable that's being traced. */
  94.     struct ActiveVarTrace *nextPtr;
  95.                 /* Next in list of all active variable
  96.                  * traces for the interpreter, or NULL
  97.                  * if no more. */
  98.     VarTrace *nextTracePtr;    /* Next trace to check after current
  99.                  * trace procedure returns;  if this
  100.                  * trace gets deleted, must update pointer
  101.                  * to avoid using free'd memory. */
  102. } ActiveVarTrace;
  103.  
  104. /*
  105.  * The following structure describes an enumerative search in progress on
  106.  * an array variable;  this are invoked with options to the "array"
  107.  * command.
  108.  */
  109.  
  110. typedef struct ArraySearch {
  111.     int id;            /* Integer id used to distinguish among
  112.                  * multiple concurrent searches for the
  113.                  * same array. */
  114.     struct Var *varPtr;        /* Pointer to array variable that's being
  115.                  * searched. */
  116.     Tcl_HashSearch search;    /* Info kept by the hash module about
  117.                  * progress through the array. */
  118.     Tcl_HashEntry *nextEntry;    /* Non-null means this is the next element
  119.                  * to be enumerated (it's leftover from
  120.                  * the Tcl_FirstHashEntry call or from
  121.                  * an "array anymore" command).  NULL
  122.                  * means must call Tcl_NextHashEntry
  123.                  * to get value to return. */
  124.     struct ArraySearch *nextPtr;/* Next in list of all active searches
  125.                  * for this variable, or NULL if this is
  126.                  * the last one. */
  127. } ArraySearch;
  128.  
  129. /*
  130.  * The structure below defines a variable, which associates a string name
  131.  * with a string value.  Pointers to these structures are kept as the
  132.  * values of hash table entries, and the name of each variable is stored
  133.  * in the hash entry.
  134.  */
  135.  
  136. typedef struct Var {
  137.     int valueLength;        /* Holds the number of non-null bytes
  138.                  * actually occupied by the variable's
  139.                  * current value in value.string (extra
  140.                  * space is sometimes left for expansion).
  141.                  * For array and global variables this is
  142.                  * meaningless. */
  143.     int valueSpace;        /* Total number of bytes of space allocated
  144.                  * at value.string.  0 means there is no
  145.                  * space allocated. */
  146.     union {
  147.     char *string;        /* String value of variable, used for scalar
  148.                  * variables and array elements.  Malloc-ed. */
  149.     Tcl_HashTable *tablePtr;/* For array variables, this points to
  150.                  * information about the hash table used
  151.                  * to implement the associative array. 
  152.                  * Points to malloc-ed data. */
  153.     struct Var *upvarPtr;    /* If this is a global variable being
  154.                  * referred to in a procedure, or a variable
  155.                  * created by "upvar", this field points to
  156.                  * the record for the higher-level variable. */
  157.     } value;
  158.     Tcl_HashEntry *hPtr;    /* Hash table entry that refers to this
  159.                  * variable, or NULL if the variable has
  160.                  * been detached from its hash table (e.g.
  161.                  * an array is deleted, but some of its
  162.                  * elements are still referred to in upvars). */
  163.     int refCount;        /* Counts number of active uses of this
  164.                  * variable, not including its main hash
  165.                  * table entry: 1 for each additional variable
  166.                  * whose upVarPtr points here, 1 for each
  167.                  * nested trace active on variable.  This
  168.                  * record can't be deleted until refCount
  169.                  * becomes 0. */
  170.     VarTrace *tracePtr;        /* First in list of all traces set for this
  171.                  * variable. */
  172.     ArraySearch *searchPtr;    /* First in list of all searches active
  173.                  * for this variable, or NULL if none. */
  174.     int flags;            /* Miscellaneous bits of information about
  175.                  * variable.  See below for definitions. */
  176. } Var;
  177.  
  178. /*
  179.  * Flag bits for variables:
  180.  *
  181.  * VAR_ARRAY    -        1 means this is an array variable rather
  182.  *                than a scalar variable.
  183.  * VAR_UPVAR -             1 means this variable just contains a
  184.  *                pointer to another variable that has the
  185.  *                real value.  Variables like this come
  186.  *                about through the "upvar" and "global"
  187.  *                commands.
  188.  * VAR_UNDEFINED -        1 means that the variable is currently
  189.  *                undefined.  Undefined variables usually
  190.  *                go away completely, but if an undefined
  191.  *                variable has a trace on it, or if it is
  192.  *                a global variable being used by a procedure,
  193.  *                then it stays around even when undefined.
  194.  * VAR_TRACE_ACTIVE -        1 means that trace processing is currently
  195.  *                underway for a read or write access, so
  196.  *                new read or write accesses should not cause
  197.  *                trace procedures to be called and the
  198.  *                variable can't be deleted.
  199.  */
  200.  
  201. #define VAR_ARRAY        1
  202. #define VAR_UPVAR        2
  203. #define VAR_UNDEFINED        4
  204. #define VAR_TRACE_ACTIVE    0x10
  205.  
  206. /*
  207.  *----------------------------------------------------------------
  208.  * Data structures related to procedures.   These are used primarily
  209.  * in tclProc.c
  210.  *----------------------------------------------------------------
  211.  */
  212.  
  213. /*
  214.  * The structure below defines an argument to a procedure, which
  215.  * consists of a name and an (optional) default value.
  216.  */
  217.  
  218. typedef struct Arg {
  219.     struct Arg *nextPtr;    /* Next argument for this procedure,
  220.                  * or NULL if this is the last argument. */
  221.     char *defValue;        /* Pointer to arg's default value, or NULL
  222.                  * if no default value. */
  223.     char name[4];        /* Name of argument starts here.  The name
  224.                  * is followed by space for the default,
  225.                  * if there is one.  The actual size of this
  226.                  * field will be as large as necessary to
  227.                  * hold both name and default value.  THIS
  228.                  * MUST BE THE LAST FIELD IN THE STRUCTURE!! */
  229. } Arg;
  230.  
  231. /*
  232.  * The structure below defines a command procedure, which consists of
  233.  * a collection of Tcl commands plus information about arguments and
  234.  * variables.
  235.  */
  236.  
  237. typedef struct Proc {
  238.     struct Interp *iPtr;    /* Interpreter for which this command
  239.                  * is defined. */
  240.     int refCount;        /* Reference count:  1 if still present
  241.                  * in command table plus 1 for each call
  242.                  * to the procedure that is currently
  243.                  * active.  This structure can be freed
  244.                  * when refCount becomes zero. */
  245.     char *command;        /* Command that constitutes the body of
  246.                  * the procedure (dynamically allocated). */
  247.     Arg *argPtr;        /* Pointer to first of procedure's formal
  248.                  * arguments, or NULL if none. */
  249. } Proc;
  250.  
  251. /*
  252.  * The structure below defines a command trace.  This is used to allow Tcl
  253.  * clients to find out whenever a command is about to be executed.
  254.  */
  255.  
  256. typedef struct Trace {
  257.     int level;            /* Only trace commands at nesting level
  258.                  * less than or equal to this. */
  259.     Tcl_CmdTraceProc *proc;    /* Procedure to call to trace command. */
  260.     ClientData clientData;    /* Arbitrary value to pass to proc. */
  261.     struct Trace *nextPtr;    /* Next in list of traces for this interp. */
  262. } Trace;
  263.  
  264. /*
  265.  * The structure below defines an entry in the assocData hash table which
  266.  * is associated with an interpreter. The entry contains a pointer to a
  267.  * function to call when the interpreter is deleted, and a pointer to
  268.  * a user-defined piece of data.
  269.  */
  270.  
  271. typedef struct AssocData {
  272.     Tcl_InterpDeleteProc *proc;    /* Proc to call when deleting. */
  273.     ClientData clientData;    /* Value to pass to proc. */
  274. } AssocData;    
  275.  
  276. /*
  277.  * The structure below defines a frame, which is a procedure invocation.
  278.  * These structures exist only while procedures are being executed, and
  279.  * provide a sort of call stack.
  280.  */
  281.  
  282. typedef struct CallFrame {
  283.     Tcl_HashTable varTable;    /* Hash table containing all of procedure's
  284.                  * local variables. */
  285.     int level;            /* Level of this procedure, for "uplevel"
  286.                  * purposes (i.e. corresponds to nesting of
  287.                  * callerVarPtr's, not callerPtr's).  1 means
  288.                  * outer-most procedure, 0 means top-level. */
  289.     int argc;            /* This and argv below describe name and
  290.                  * arguments for this procedure invocation. */
  291.     char **argv;        /* Array of arguments. */
  292.     struct CallFrame *callerPtr;
  293.                 /* Value of interp->framePtr when this
  294.                  * procedure was invoked (i.e. next in
  295.                  * stack of all active procedures). */
  296.     struct CallFrame *callerVarPtr;
  297.                 /* Value of interp->varFramePtr when this
  298.                  * procedure was invoked (i.e. determines
  299.                  * variable scoping within caller;  same
  300.                  * as callerPtr unless an "uplevel" command
  301.                  * or something equivalent was active in
  302.                  * the caller). */
  303. } CallFrame;
  304.  
  305. /*
  306.  * The structure below defines one history event (a previously-executed
  307.  * command that can be re-executed in whole or in part).
  308.  */
  309.  
  310. typedef struct {
  311.     char *command;        /* String containing previously-executed
  312.                  * command. */
  313.     int bytesAvl;        /* Total # of bytes available at *event (not
  314.                  * all are necessarily in use now). */
  315. } HistoryEvent;
  316.  
  317. /*
  318.  *----------------------------------------------------------------
  319.  * Data structures related to history.   These are used primarily
  320.  * in tclHistory.c
  321.  *----------------------------------------------------------------
  322.  */
  323.  
  324. /*
  325.  * The structure below defines a pending revision to the most recent
  326.  * history event.  Changes are linked together into a list and applied
  327.  * during the next call to Tcl_RecordHistory.  See the comments at the
  328.  * beginning of tclHistory.c for information on revisions.
  329.  */
  330.  
  331. typedef struct HistoryRev {
  332.     int firstIndex;        /* Index of the first byte to replace in
  333.                  * current history event. */
  334.     int lastIndex;        /* Index of last byte to replace in
  335.                  * current history event. */
  336.     int newSize;        /* Number of bytes in newBytes. */
  337.     char *newBytes;        /* Replacement for the range given by
  338.                  * firstIndex and lastIndex (malloced). */
  339.     struct HistoryRev *nextPtr;    /* Next in chain of revisions to apply, or
  340.                  * NULL for end of list. */
  341. } HistoryRev;
  342.  
  343. /*
  344.  *----------------------------------------------------------------
  345.  * Data structures related to expressions.  These are used only in
  346.  * tclExpr.c.
  347.  *----------------------------------------------------------------
  348.  */
  349.  
  350. /*
  351.  * The data structure below defines a math function (e.g. sin or hypot)
  352.  * for use in Tcl expressions.
  353.  */
  354.  
  355. #define MAX_MATH_ARGS 5
  356. typedef struct MathFunc {
  357.     int numArgs;        /* Number of arguments for function. */
  358.     Tcl_ValueType argTypes[MAX_MATH_ARGS];
  359.                 /* Acceptable types for each argument. */
  360.     Tcl_MathProc *proc;        /* Procedure that implements this function. */
  361.     ClientData clientData;    /* Additional argument to pass to the function
  362.                  * when invoking it. */
  363. } MathFunc;
  364.  
  365. /*
  366.  *----------------------------------------------------------------
  367.  * One of the following structures exists for each command in
  368.  * an interpreter.  The Tcl_Command opaque type actually refers
  369.  * to these structures.
  370.  *----------------------------------------------------------------
  371.  */
  372.  
  373. typedef struct Command {
  374.     Tcl_HashEntry *hPtr;    /* Pointer to the hash table entry in
  375.                  * interp->commandTable that refers to
  376.                  * this command.  Used to get a command's
  377.                  * name from its Tcl_Command handle.  NULL
  378.                  * means that the hash table entry has
  379.                  * been removed already (this can happen
  380.                  * if deleteProc causes the command to be
  381.                  * deleted or recreated). */
  382.     Tcl_CmdProc *proc;        /* Procedure to process command. */
  383.     ClientData clientData;    /* Arbitrary value to pass to proc. */
  384.     Tcl_CmdDeleteProc *deleteProc;
  385.                 /* Procedure to invoke when deleting
  386.                  * command. */
  387.     ClientData deleteData;    /* Arbitrary value to pass to deleteProc
  388.                  * (usually the same as clientData). */
  389.     int deleted;        /* Means that the command is in the process
  390.                  * of being deleted (its deleteProc is
  391.                  * currently executing).  Any other attempts
  392.                  * to delete the command should be ignored. */
  393. } Command;
  394.  
  395. /*
  396.  *----------------------------------------------------------------
  397.  * This structure defines an interpreter, which is a collection of
  398.  * commands plus other state information related to interpreting
  399.  * commands, such as variable storage.  Primary responsibility for
  400.  * this data structure is in tclBasic.c, but almost every Tcl
  401.  * source file uses something in here.
  402.  *----------------------------------------------------------------
  403.  */
  404.  
  405. typedef struct Interp {
  406.  
  407.     /*
  408.      * Note:  the first three fields must match exactly the fields in
  409.      * a Tcl_Interp struct (see tcl.h).  If you change one, be sure to
  410.      * change the other.
  411.      */
  412.  
  413.     char *result;        /* Points to result returned by last
  414.                  * command. */
  415.     Tcl_FreeProc *freeProc;    /* Zero means result is statically allocated.
  416.                  * TCL_DYNAMIC means result was allocated with
  417.                  * ckalloc and should be freed with ckfree.
  418.                  * Other values give address of procedure
  419.                  * to invoke to free the result.  Must be
  420.                  * freed by Tcl_Eval before executing next
  421.                  * command. */
  422.     int errorLine;        /* When TCL_ERROR is returned, this gives
  423.                  * the line number within the command where
  424.                  * the error occurred (1 means first line). */
  425.     Tcl_HashTable commandTable;    /* Contains all of the commands currently
  426.                  * registered in this interpreter.  Indexed
  427.                  * by strings; values have type (Command *). */
  428.     Tcl_HashTable mathFuncTable;/* Contains all of the math functions currently
  429.                  * defined for the interpreter.  Indexed by
  430.                  * strings (function names);  values have
  431.                  * type (MathFunc *). */
  432.  
  433.     /*
  434.      * Information related to procedures and variables.  See tclProc.c
  435.      * and tclvar.c for usage.
  436.      */
  437.  
  438.     Tcl_HashTable globalTable;    /* Contains all global variables for
  439.                  * interpreter. */
  440.     int numLevels;        /* Keeps track of how many nested calls to
  441.                  * Tcl_Eval are in progress for this
  442.                  * interpreter.  It's used to delay deletion
  443.                  * of the table until all Tcl_Eval invocations
  444.                  * are completed. */
  445.     int maxNestingDepth;    /* If numLevels exceeds this value then Tcl
  446.                  * assumes that infinite recursion has
  447.                  * occurred and it generates an error. */
  448.     CallFrame *framePtr;    /* Points to top-most in stack of all nested
  449.                  * procedure invocations.  NULL means there
  450.                  * are no active procedures. */
  451.     CallFrame *varFramePtr;    /* Points to the call frame whose variables
  452.                  * are currently in use (same as framePtr
  453.                  * unless an "uplevel" command is being
  454.                  * executed).  NULL means no procedure is
  455.                  * active or "uplevel 0" is being exec'ed. */
  456.     ActiveVarTrace *activeTracePtr;
  457.                 /* First in list of active traces for interp,
  458.                  * or NULL if no active traces. */
  459.     int returnCode;        /* Completion code to return if current
  460.                  * procedure exits with a TCL_RETURN code. */
  461.     char *errorInfo;        /* Value to store in errorInfo if returnCode
  462.                  * is TCL_ERROR.  Malloc'ed, may be NULL */
  463.     char *errorCode;        /* Value to store in errorCode if returnCode
  464.                  * is TCL_ERROR.  Malloc'ed, may be NULL */
  465.  
  466.     /*
  467.      * Information related to history:
  468.      */
  469.  
  470.     int numEvents;        /* Number of previously-executed commands
  471.                  * to retain. */
  472.     HistoryEvent *events;    /* Array containing numEvents entries
  473.                  * (dynamically allocated). */
  474.     int curEvent;        /* Index into events of place where current
  475.                  * (or most recent) command is recorded. */
  476.     int curEventNum;        /* Event number associated with the slot
  477.                  * given by curEvent. */
  478.     HistoryRev *revPtr;        /* First in list of pending revisions. */
  479.     char *historyFirst;        /* First char. of current command executed
  480.                  * from history module or NULL if none. */
  481.     int revDisables;        /* 0 means history revision OK;  > 0 gives
  482.                  * a count of number of times revision has
  483.                  * been disabled. */
  484.     char *evalFirst;        /* If TCL_RECORD_BOUNDS flag set, Tcl_Eval
  485.                  * sets this field to point to the first
  486.                  * char. of text from which the current
  487.                  * command came.  Otherwise Tcl_Eval sets
  488.                  * this to NULL. */
  489.     char *evalLast;        /* Similar to evalFirst, except points to
  490.                  * last character of current command. */
  491.  
  492.     /*
  493.      * Information used by Tcl_AppendResult to keep track of partial
  494.      * results.  See Tcl_AppendResult code for details.
  495.      */
  496.  
  497.     char *appendResult;        /* Storage space for results generated
  498.                  * by Tcl_AppendResult.  Malloc-ed.  NULL
  499.                  * means not yet allocated. */
  500.     int appendAvl;        /* Total amount of space available at
  501.                  * partialResult. */
  502.     int appendUsed;        /* Number of non-null bytes currently
  503.                  * stored at partialResult. */
  504.  
  505.     /*
  506.      * A cache of compiled regular expressions.  See Tcl_RegExpCompile
  507.      * in tclUtil.c for details.
  508.      */
  509.  
  510. #define NUM_REGEXPS 5
  511.     char *patterns[NUM_REGEXPS];/* Strings corresponding to compiled
  512.                  * regular expression patterns.  NULL
  513.                  * means that this slot isn't used.
  514.                  * Malloc-ed. */
  515.     int patLengths[NUM_REGEXPS];/* Number of non-null characters in
  516.                  * corresponding entry in patterns.
  517.                  * -1 means entry isn't used. */
  518.     regexp *regexps[NUM_REGEXPS];
  519.                 /* Compiled forms of above strings.  Also
  520.                  * malloc-ed, or NULL if not in use yet. */
  521.  
  522.     /*
  523.      * Information about packages.  Used only in tclPkg.c.
  524.      */
  525.  
  526.     Tcl_HashTable packageTable;    /* Describes all of the packages loaded
  527.                  * in or available to this interpreter.
  528.                  * Keys are package names, values are
  529.                  * (Package *) pointers. */
  530.     char *packageUnknown;    /* Command to invoke during "package
  531.                  * require" commands for packages that
  532.                  * aren't described in packageTable. 
  533.                  * Malloc'ed, may be NULL. */
  534.  
  535.     /*
  536.      * Information used by Tcl_PrintDouble:
  537.      */
  538.  
  539.     char pdFormat[10];        /* Format string used by Tcl_PrintDouble. */
  540.     int pdPrec;            /* Current precision (used to restore the
  541.                  * the tcl_precision variable after a bogus
  542.                  * value has been put into it). */
  543.  
  544.     /*
  545.      * Miscellaneous information:
  546.      */
  547.  
  548.     int cmdCount;        /* Total number of times a command procedure
  549.                  * has been called for this interpreter. */
  550.     int noEval;            /* Non-zero means no commands should actually
  551.                  * be executed:  just parse only.  Used in
  552.                  * expressions when the result is already
  553.                  * determined. */
  554.     int evalFlags;        /* Flags to control next call to Tcl_Eval.
  555.                  * Normally zero, but may be set before
  556.                  * calling Tcl_Eval.  See below for valid
  557.                  * values. */
  558.     char *termPtr;        /* Character just after the last one in
  559.                  * a command.  Set by Tcl_Eval before
  560.                  * returning. */
  561.     char *scriptFile;        /* NULL means there is no nested source
  562.                  * command active;  otherwise this points to
  563.                  * the name of the file being sourced (it's
  564.                  * not malloc-ed:  it points to an argument
  565.                  * to Tcl_EvalFile. */
  566.     int flags;            /* Various flag bits.  See below. */
  567.     Trace *tracePtr;        /* List of traces for this interpreter. */
  568.     Tcl_HashTable *assocData;    /* Hash table for associating data with
  569.                                  * this interpreter. Cleaned up when
  570.                                  * this interpreter is deleted. */
  571.     char resultSpace[TCL_RESULT_SIZE+1];
  572.                 /* Static space for storing small results. */
  573. } Interp;
  574.  
  575. /*
  576.  * EvalFlag bits for Interp structures:
  577.  *
  578.  * TCL_BRACKET_TERM    1 means that the current script is terminated by
  579.  *            a close bracket rather than the end of the string.
  580.  * TCL_RECORD_BOUNDS    Tells Tcl_Eval to record information in the
  581.  *            evalFirst and evalLast fields for each command
  582.  *            executed directly from the string (top-level
  583.  *            commands and those from command substitution).
  584.  * TCL_ALLOW_EXCEPTIONS    1 means it's OK for the script to terminate with
  585.  *            a code other than TCL_OK or TCL_ERROR;  0 means
  586.  *            codes other than these should be turned into errors.
  587.  */
  588.  
  589. #define TCL_BRACKET_TERM    1
  590. #define TCL_RECORD_BOUNDS    2
  591. #define TCL_ALLOW_EXCEPTIONS    4
  592.  
  593. /*
  594.  * Flag bits for Interp structures:
  595.  *
  596.  * DELETED:        Non-zero means the interpreter has been deleted:
  597.  *            don't process any more commands for it, and destroy
  598.  *            the structure as soon as all nested invocations of
  599.  *            Tcl_Eval are done.
  600.  * ERR_IN_PROGRESS:    Non-zero means an error unwind is already in progress.
  601.  *            Zero means a command proc has been invoked since last
  602.  *            error occured.
  603.  * ERR_ALREADY_LOGGED:    Non-zero means information has already been logged
  604.  *            in $errorInfo for the current Tcl_Eval instance,
  605.  *            so Tcl_Eval needn't log it (used to implement the
  606.  *            "error message log" command).
  607.  * ERROR_CODE_SET:    Non-zero means that Tcl_SetErrorCode has been
  608.  *            called to record information for the current
  609.  *            error.  Zero means Tcl_Eval must clear the
  610.  *            errorCode variable if an error is returned.
  611.  * EXPR_INITIALIZED:    1 means initialization specific to expressions has
  612.  *            been carried out.
  613.  */
  614.  
  615. #define DELETED            1
  616. #define ERR_IN_PROGRESS        2
  617. #define ERR_ALREADY_LOGGED    4
  618. #define ERROR_CODE_SET        8
  619. #define EXPR_INITIALIZED    0x10
  620.  
  621. /*
  622.  * Default value for the pdPrec and pdFormat fields of interpreters:
  623.  */
  624.  
  625. #define DEFAULT_PD_PREC 6
  626. #define DEFAULT_PD_FORMAT "%g"
  627.  
  628. /*
  629.  *----------------------------------------------------------------
  630.  * Data structures related to command parsing.   These are used in
  631.  * tclParse.c and its clients.
  632.  *----------------------------------------------------------------
  633.  */
  634.  
  635. /*
  636.  * The following data structure is used by various parsing procedures
  637.  * to hold information about where to store the results of parsing
  638.  * (e.g. the substituted contents of a quoted argument, or the result
  639.  * of a nested command).  At any given time, the space available
  640.  * for output is fixed, but a procedure may be called to expand the
  641.  * space available if the current space runs out.
  642.  */
  643.  
  644. typedef struct ParseValue {
  645.     char *buffer;        /* Address of first character in
  646.                  * output buffer. */
  647.     char *next;            /* Place to store next character in
  648.                  * output buffer. */
  649.     char *end;            /* Address of the last usable character
  650.                  * in the buffer. */
  651.     void (*expandProc) _ANSI_ARGS_((struct ParseValue *pvPtr, int needed));
  652.                 /* Procedure to call when space runs out;
  653.                  * it will make more space. */
  654.     ClientData clientData;    /* Arbitrary information for use of
  655.                  * expandProc. */
  656. } ParseValue;
  657.  
  658. /*
  659.  * A table used to classify input characters to assist in parsing
  660.  * Tcl commands.  The table should be indexed with a signed character
  661.  * using the CHAR_TYPE macro.  The character may have a negative
  662.  * value.
  663.  */
  664.  
  665. extern char tclTypeTable[];
  666. #define CHAR_TYPE(c) (tclTypeTable+128)[c]
  667.  
  668. /*
  669.  * Possible values returned by CHAR_TYPE:
  670.  *
  671.  * TCL_NORMAL -        All characters that don't have special significance
  672.  *            to the Tcl language.
  673.  * TCL_SPACE -        Character is space, tab, or return.
  674.  * TCL_COMMAND_END -    Character is newline or null or semicolon or
  675.  *            close-bracket.
  676.  * TCL_QUOTE -        Character is a double-quote.
  677.  * TCL_OPEN_BRACKET -    Character is a "[".
  678.  * TCL_OPEN_BRACE -    Character is a "{".
  679.  * TCL_CLOSE_BRACE -    Character is a "}".
  680.  * TCL_BACKSLASH -    Character is a "\".
  681.  * TCL_DOLLAR -        Character is a "$".
  682.  */
  683.  
  684. #define TCL_NORMAL        0
  685. #define TCL_SPACE        1
  686. #define TCL_COMMAND_END        2
  687. #define TCL_QUOTE        3
  688. #define TCL_OPEN_BRACKET    4
  689. #define TCL_OPEN_BRACE        5
  690. #define TCL_CLOSE_BRACE        6
  691. #define TCL_BACKSLASH        7
  692. #define TCL_DOLLAR        8
  693.  
  694. /*
  695.  * Maximum number of levels of nesting permitted in Tcl commands (used
  696.  * to catch infinite recursion).
  697.  */
  698.  
  699. #define MAX_NESTING_DEPTH    1000
  700.  
  701. /*
  702.  * The macro below is used to modify a "char" value (e.g. by casting
  703.  * it to an unsigned character) so that it can be used safely with
  704.  * macros such as isspace.
  705.  */
  706.  
  707. #define UCHAR(c) ((unsigned char) (c))
  708.  
  709. /*
  710.  * Given a size or address, the macro below "aligns" it to the machine's
  711.  * memory unit size (e.g. an 8-byte boundary) so that anything can be
  712.  * placed at the aligned address without fear of an alignment error.
  713.  */
  714.  
  715. #define TCL_ALIGN(x) ((x + 7) & ~7)
  716.  
  717. /*
  718.  * For each event source (created with Tcl_CreateEventSource) there
  719.  * is a structure of the following type:
  720.  */
  721.  
  722. typedef struct TclEventSource {
  723.     Tcl_EventSetupProc *setupProc;    /* This procedure is called by
  724.                      * Tcl_DoOneEvent to set up information
  725.                      * for the wait operation, such as
  726.                      * files to wait for or maximum
  727.                      * timeout. */
  728.     Tcl_EventCheckProc *checkProc;    /* This procedure is called by
  729.                      * Tcl_DoOneEvent after its wait
  730.                      * operation to see what events
  731.                      * are ready and queue them. */
  732.     ClientData clientData;        /* Arbitrary one-word argument to pass
  733.                      * to setupProc and checkProc. */
  734.     struct TclEventSource *nextPtr;    /* Next in list of all event sources
  735.                      * defined for applicaton. */
  736. } TclEventSource;
  737.  
  738. /*
  739.  * The following macros are used to specify the runtime platform
  740.  * setting of the tclPlatform variable.
  741.  */
  742.  
  743. typedef enum {
  744.     TCL_PLATFORM_UNIX,        /* Any Unix-like OS. */
  745.     TCL_PLATFORM_MAC,        /* MacOS. */
  746.     TCL_PLATFORM_WINDOWS    /* Any Microsoft Windows OS. */
  747. } TclPlatformType;
  748.  
  749. /*
  750.  *----------------------------------------------------------------
  751.  * Variables shared among Tcl modules but not used by the outside
  752.  * world:
  753.  *----------------------------------------------------------------
  754.  */
  755.  
  756. extern Tcl_Time            tclBlockTime;
  757. extern int            tclBlockTimeSet;
  758. extern char *            tclExecutableName;
  759. extern TclEventSource *        tclFirstEventSourcePtr;
  760. extern Tcl_ChannelType         tclFileChannelType;
  761. extern char *            tclMemDumpFileName;
  762. extern TclPlatformType        tclPlatform;
  763.  
  764. /*
  765.  *----------------------------------------------------------------
  766.  * Procedures shared among Tcl modules but not used by the outside
  767.  * world:
  768.  *----------------------------------------------------------------
  769.  */
  770.  
  771. EXTERN void        panic();
  772. EXTERN int        TclCleanupChildren _ANSI_ARGS_((Tcl_Interp *interp,
  773.                     int numPids, int *pidPtr, Tcl_Channel errorChan));
  774. EXTERN int        TclCloseFile _ANSI_ARGS_((Tcl_File file));
  775. EXTERN char *        TclConvertToNative _ANSI_ARGS_((Tcl_Interp *interp,
  776.                 char *name, Tcl_DString *bufferPtr));
  777. EXTERN char *        TclConvertToNetwork _ANSI_ARGS_((Tcl_Interp *interp,
  778.                 char *name, Tcl_DString *bufferPtr));
  779. EXTERN void        TclCopyAndCollapse _ANSI_ARGS_((int count, char *src,
  780.                 char *dst));
  781. EXTERN int        TclChdir _ANSI_ARGS_((Tcl_Interp *interp,
  782.                 char *dirName));
  783. EXTERN void        TclClosePipeFile _ANSI_ARGS_((Tcl_File file));
  784. EXTERN Tcl_Channel    TclCreateCommandChannel _ANSI_ARGS_((
  785.                     Tcl_File readFile, Tcl_File writeFile,
  786.                 Tcl_File errorFile, int numPids, int *pidPtr));
  787. EXTERN int              TclCreatePipe _ANSI_ARGS_((Tcl_File *readPipe,
  788.                 Tcl_File *writePipe));
  789. EXTERN int        TclCreatePipeline _ANSI_ARGS_((Tcl_Interp *interp,
  790.                 int argc, char **argv, int **pidArrayPtr,
  791.                 Tcl_File *inPipePtr,
  792.                 Tcl_File *outPipePtr,
  793.                 Tcl_File *errFilePtr));
  794. EXTERN Tcl_File        TclCreateTempFile _ANSI_ARGS_((char *contents));
  795. EXTERN void        TclDeleteVars _ANSI_ARGS_((Interp *iPtr,
  796.                 Tcl_HashTable *tablePtr));
  797. EXTERN int        TclDoGlob _ANSI_ARGS_((Tcl_Interp *interp,
  798.                 char *separators, Tcl_DString *headPtr,
  799.                 char *tail));
  800. EXTERN void        TclExpandParseValue _ANSI_ARGS_((ParseValue *pvPtr,
  801.                 int needed));
  802. EXTERN void        TclExprFloatError _ANSI_ARGS_((Tcl_Interp *interp,
  803.                 double value));
  804. EXTERN int        TclFindElement _ANSI_ARGS_((Tcl_Interp *interp,
  805.                 char *list, char **elementPtr, char **nextPtr,
  806.                 int *sizePtr, int *bracePtr));
  807. EXTERN Proc *        TclFindProc _ANSI_ARGS_((Interp *iPtr,
  808.                 char *procName));
  809. EXTERN void        TclFreePackageInfo _ANSI_ARGS_((Interp *iPtr));
  810. EXTERN char *        TclGetCwd _ANSI_ARGS_((Tcl_Interp *interp));
  811. EXTERN unsigned long    TclGetClicks _ANSI_ARGS_((void));
  812. EXTERN char *        TclGetExtension _ANSI_ARGS_((char *name));
  813. EXTERN void        TclGetAndDetachPids _ANSI_ARGS_((Tcl_Interp *interp,
  814.                     Tcl_Channel chan));
  815. EXTERN int        TclGetDate _ANSI_ARGS_((char *p,
  816.                 unsigned long now, long zone,
  817.                 unsigned long *timePtr));
  818. EXTERN Tcl_Channel    TclGetDefaultStdChannel _ANSI_ARGS_((int type));
  819. EXTERN char *        TclGetEnv _ANSI_ARGS_((char *name));
  820. EXTERN int        TclGetFrame _ANSI_ARGS_((Tcl_Interp *interp,
  821.                 char *string, CallFrame **framePtrPtr));
  822. EXTERN int        TclGetOpenMode _ANSI_ARGS_((Tcl_Interp *interp,
  823.                     char *string, int *seekFlagPtr));
  824. EXTERN unsigned long    TclGetSeconds _ANSI_ARGS_((void));
  825. EXTERN void        TclGetTime _ANSI_ARGS_((Tcl_Time *time));
  826. EXTERN int        TclGetTimeZone _ANSI_ARGS_((unsigned long time));
  827. EXTERN char *        TclGetUserHome _ANSI_ARGS_((char *name,
  828.                 Tcl_DString *bufferPtr));
  829. EXTERN int        TclGetListIndex _ANSI_ARGS_((Tcl_Interp *interp,
  830.                 char *string, int *indexPtr));
  831. EXTERN int        TclGetLoadedPackages _ANSI_ARGS_((Tcl_Interp *interp,
  832.                 char *targetName));
  833. EXTERN char *        TclGetUserHome _ANSI_ARGS_((char *name,
  834.                 Tcl_DString *bufferPtr));
  835. EXTERN int        TclGuessPackageName _ANSI_ARGS_((char *fileName,
  836.                 Tcl_DString *bufPtr));
  837. EXTERN int              TclHasPipes _ANSI_ARGS_((void));
  838. EXTERN int        TclHasSockets _ANSI_ARGS_((Tcl_Interp *interp));
  839. EXTERN int        TclIdlePending _ANSI_ARGS_((void));
  840. EXTERN int        TclInterpInit _ANSI_ARGS_((Tcl_Interp *interp));
  841. EXTERN Proc *        TclIsProc _ANSI_ARGS_((Command *cmdPtr));
  842. EXTERN int        TclLoadFile _ANSI_ARGS_((Tcl_Interp *interp,
  843.                 char *fileName, char *sym1, char *sym2,
  844.                 Tcl_PackageInitProc **proc1Ptr,
  845.                 Tcl_PackageInitProc **proc2Ptr));
  846. EXTERN int        TclMakeFileTable _ANSI_ARGS_((Tcl_Interp *interp,
  847.                             int noStdio));
  848. EXTERN int        TclMatchFiles _ANSI_ARGS_((Tcl_Interp *interp,
  849.                 char *separators, Tcl_DString *dirPtr,
  850.                 char *pattern, char *tail));
  851. EXTERN int        TclNeedSpace _ANSI_ARGS_((char *start, char *end));
  852. EXTERN Tcl_File        TclOpenFile _ANSI_ARGS_((char *fname, int mode));
  853. EXTERN int        TclParseBraces _ANSI_ARGS_((Tcl_Interp *interp,
  854.                 char *string, char **termPtr, ParseValue *pvPtr));
  855. EXTERN int        TclParseNestedCmd _ANSI_ARGS_((Tcl_Interp *interp,
  856.                 char *string, int flags, char **termPtr,
  857.                 ParseValue *pvPtr));
  858. EXTERN int        TclParseQuotes _ANSI_ARGS_((Tcl_Interp *interp,
  859.                 char *string, int termChar, int flags,
  860.                 char **termPtr, ParseValue *pvPtr));
  861. EXTERN int        TclParseWords _ANSI_ARGS_((Tcl_Interp *interp,
  862.                 char *string, int flags, int maxWords,
  863.                 char **termPtr, int *argcPtr, char **argv,
  864.                 ParseValue *pvPtr));
  865. EXTERN void        TclPlatformExit _ANSI_ARGS_((int status));
  866. EXTERN void        TclPlatformInit _ANSI_ARGS_((Tcl_Interp *interp));
  867. EXTERN char *        TclPrecTraceProc _ANSI_ARGS_((ClientData clientData,
  868.                 Tcl_Interp *interp, char *name1, char *name2,
  869.                 int flags));
  870. EXTERN int        TclPreventAliasLoop _ANSI_ARGS_((Tcl_Interp *interp,
  871.                     Tcl_Interp *cmdInterp, char *cmdName,
  872.                             Tcl_CmdProc *proc, ClientData clientData));
  873. EXTERN int        TclReadFile _ANSI_ARGS_((Tcl_File file,
  874.                 int shouldBlock, char *buf, int toRead));
  875. EXTERN int        TclSeekFile _ANSI_ARGS_((Tcl_File file,
  876.                 int offset, int whence));
  877. EXTERN int        TclServiceIdle _ANSI_ARGS_((void));
  878. EXTERN void        TclSetupEnv _ANSI_ARGS_((Tcl_Interp *interp));
  879. EXTERN int        TclSockGetPort _ANSI_ARGS_((Tcl_Interp *interp,
  880.                     char *string, char *proto, int *portPtr));
  881. EXTERN int        TclSockMinimumBuffers _ANSI_ARGS_((int sock,
  882.                     int size));
  883. EXTERN int              TclSpawnPipeline _ANSI_ARGS_((Tcl_Interp *interp,
  884.                         int *pidPtr, int *numPids, int argc, char **argv,
  885.                 Tcl_File inputFile,
  886.                 Tcl_File outputFile,
  887.                         Tcl_File errorFile,
  888.                         char *intIn, char *finalOut));
  889. EXTERN int        TclTestChannelCmd _ANSI_ARGS_((ClientData clientData,
  890.                 Tcl_Interp *interp, int argc, char **argv));
  891. EXTERN int        TclTestChannelEventCmd _ANSI_ARGS_((
  892.                     ClientData clientData, Tcl_Interp *interp,
  893.                             int argc, char **argv));
  894. EXTERN int        TclUpdateReturnInfo _ANSI_ARGS_((Interp *iPtr));
  895. EXTERN int        TclWaitForFile _ANSI_ARGS_((Tcl_File file,
  896.                 int mask, int timeout));
  897. EXTERN char *        TclWordEnd _ANSI_ARGS_((char *start, int nested,
  898.                 int *semiPtr));
  899. EXTERN int        TclWriteFile _ANSI_ARGS_((Tcl_File file,
  900.                 int shouldBlock, char *buf, int toWrite));
  901.  
  902. /*
  903.  *----------------------------------------------------------------
  904.  * Command procedures in the generic core:
  905.  *----------------------------------------------------------------
  906.  */
  907.  
  908. EXTERN int    Tcl_AfterCmd _ANSI_ARGS_((ClientData clientData,
  909.             Tcl_Interp *interp, int argc, char **argv));
  910. EXTERN int    Tcl_AppendCmd _ANSI_ARGS_((ClientData clientData,
  911.             Tcl_Interp *interp, int argc, char **argv));
  912. EXTERN int    Tcl_ArrayCmd _ANSI_ARGS_((ClientData clientData,
  913.             Tcl_Interp *interp, int argc, char **argv));
  914. EXTERN int    Tcl_BreakCmd _ANSI_ARGS_((ClientData clientData,
  915.             Tcl_Interp *interp, int argc, char **argv));
  916. EXTERN int    Tcl_CaseCmd _ANSI_ARGS_((ClientData clientData,
  917.             Tcl_Interp *interp, int argc, char **argv));
  918. EXTERN int    Tcl_CatchCmd _ANSI_ARGS_((ClientData clientData,
  919.             Tcl_Interp *interp, int argc, char **argv));
  920. EXTERN int    Tcl_CdCmd _ANSI_ARGS_((ClientData clientData,
  921.             Tcl_Interp *interp, int argc, char **argv));
  922. EXTERN int    Tcl_ClockCmd _ANSI_ARGS_((ClientData clientData,
  923.             Tcl_Interp *interp, int argc, char **argv));
  924. EXTERN int    Tcl_CloseCmd _ANSI_ARGS_((ClientData clientData,
  925.             Tcl_Interp *interp, int argc, char **argv));
  926. EXTERN int    Tcl_ConcatCmd _ANSI_ARGS_((ClientData clientData,
  927.             Tcl_Interp *interp, int argc, char **argv));
  928. EXTERN int    Tcl_ContinueCmd _ANSI_ARGS_((ClientData clientData,
  929.             Tcl_Interp *interp, int argc, char **argv));
  930. EXTERN int     Tcl_CpCmd _ANSI_ARGS_((ClientData clientData,
  931.             Tcl_Interp *interp, int argc, char **argv));
  932. EXTERN int     Tcl_EchoCmd _ANSI_ARGS_((ClientData clientData,
  933.             Tcl_Interp *interp, int argc, char **argv));
  934. EXTERN int    Tcl_EofCmd _ANSI_ARGS_((ClientData clientData,
  935.             Tcl_Interp *interp, int argc, char **argv));
  936. EXTERN int    Tcl_ErrorCmd _ANSI_ARGS_((ClientData clientData,
  937.             Tcl_Interp *interp, int argc, char **argv));
  938. EXTERN int    Tcl_EvalCmd _ANSI_ARGS_((ClientData clientData,
  939.             Tcl_Interp *interp, int argc, char **argv));
  940. EXTERN int    Tcl_ExecCmd _ANSI_ARGS_((ClientData clientData,
  941.             Tcl_Interp *interp, int argc, char **argv));
  942. EXTERN int    Tcl_ExitCmd _ANSI_ARGS_((ClientData clientData,
  943.             Tcl_Interp *interp, int argc, char **argv));
  944. EXTERN int    Tcl_ExprCmd _ANSI_ARGS_((ClientData clientData,
  945.             Tcl_Interp *interp, int argc, char **argv));
  946. EXTERN int    Tcl_FblockedCmd _ANSI_ARGS_((ClientData clientData,
  947.             Tcl_Interp *interp, int argc, char **argv));
  948. EXTERN int    Tcl_FconfigureCmd _ANSI_ARGS_((ClientData clientData,
  949.             Tcl_Interp *interp, int argc, char **argv));
  950. EXTERN int    Tcl_FileCmd _ANSI_ARGS_((ClientData clientData,
  951.             Tcl_Interp *interp, int argc, char **argv));
  952. EXTERN int    Tcl_FileEventCmd _ANSI_ARGS_((ClientData clientData,
  953.             Tcl_Interp *interp, int argc, char **argv));
  954. EXTERN int    Tcl_FlushCmd _ANSI_ARGS_((ClientData clientData,
  955.             Tcl_Interp *interp, int argc, char **argv));
  956. EXTERN int    Tcl_ForCmd _ANSI_ARGS_((ClientData clientData,
  957.             Tcl_Interp *interp, int argc, char **argv));
  958. EXTERN int    Tcl_ForeachCmd _ANSI_ARGS_((ClientData clientData,
  959.             Tcl_Interp *interp, int argc, char **argv));
  960. EXTERN int    Tcl_FormatCmd _ANSI_ARGS_((ClientData clientData,
  961.             Tcl_Interp *interp, int argc, char **argv));
  962. EXTERN int    Tcl_GetsCmd _ANSI_ARGS_((ClientData clientData,
  963.             Tcl_Interp *interp, int argc, char **argv));
  964. EXTERN int    Tcl_GlobalCmd _ANSI_ARGS_((ClientData clientData,
  965.             Tcl_Interp *interp, int argc, char **argv));
  966. EXTERN int    Tcl_GlobCmd _ANSI_ARGS_((ClientData clientData,
  967.             Tcl_Interp *interp, int argc, char **argv));
  968. EXTERN int    Tcl_HistoryCmd _ANSI_ARGS_((ClientData clientData,
  969.             Tcl_Interp *interp, int argc, char **argv));
  970. EXTERN int    Tcl_IfCmd _ANSI_ARGS_((ClientData clientData,
  971.             Tcl_Interp *interp, int argc, char **argv));
  972. EXTERN int    Tcl_IncrCmd _ANSI_ARGS_((ClientData clientData,
  973.             Tcl_Interp *interp, int argc, char **argv));
  974. EXTERN int    Tcl_InfoCmd _ANSI_ARGS_((ClientData clientData,
  975.             Tcl_Interp *interp, int argc, char **argv));
  976. EXTERN int    Tcl_InterpCmd _ANSI_ARGS_((ClientData clientData,
  977.             Tcl_Interp *interp, int argc, char **argv));
  978. EXTERN int    Tcl_JoinCmd _ANSI_ARGS_((ClientData clientData,
  979.             Tcl_Interp *interp, int argc, char **argv));
  980. EXTERN int    Tcl_LappendCmd _ANSI_ARGS_((ClientData clientData,
  981.             Tcl_Interp *interp, int argc, char **argv));
  982. EXTERN int    Tcl_LindexCmd _ANSI_ARGS_((ClientData clientData,
  983.             Tcl_Interp *interp, int argc, char **argv));
  984. EXTERN int    Tcl_LinsertCmd _ANSI_ARGS_((ClientData clientData,
  985.             Tcl_Interp *interp, int argc, char **argv));
  986. EXTERN int    Tcl_LlengthCmd _ANSI_ARGS_((ClientData clientData,
  987.             Tcl_Interp *interp, int argc, char **argv));
  988. EXTERN int    Tcl_ListCmd _ANSI_ARGS_((ClientData clientData,
  989.             Tcl_Interp *interp, int argc, char **argv));
  990. EXTERN int    Tcl_LoadCmd _ANSI_ARGS_((ClientData clientData,
  991.             Tcl_Interp *interp, int argc, char **argv));
  992. EXTERN int    Tcl_LrangeCmd _ANSI_ARGS_((ClientData clientData,
  993.             Tcl_Interp *interp, int argc, char **argv));
  994. EXTERN int    Tcl_LreplaceCmd _ANSI_ARGS_((ClientData clientData,
  995.             Tcl_Interp *interp, int argc, char **argv));
  996. EXTERN int     Tcl_LsCmd _ANSI_ARGS_((ClientData clientData,
  997.             Tcl_Interp *interp, int argc, char **argv));
  998. EXTERN int    Tcl_LsearchCmd _ANSI_ARGS_((ClientData clientData,
  999.             Tcl_Interp *interp, int argc, char **argv));
  1000. EXTERN int    Tcl_LsortCmd _ANSI_ARGS_((ClientData clientData,
  1001.             Tcl_Interp *interp, int argc, char **argv));
  1002. EXTERN int     Tcl_MacBeepCmd _ANSI_ARGS_((ClientData clientData,
  1003.             Tcl_Interp *interp, int argc, char **argv));
  1004. EXTERN int     Tcl_MacSourceCmd _ANSI_ARGS_((ClientData clientData,
  1005.             Tcl_Interp *interp, int argc, char **argv));
  1006. EXTERN int     Tcl_MkdirCmd _ANSI_ARGS_((ClientData clientData,
  1007.             Tcl_Interp *interp, int argc, char **argv));
  1008. EXTERN int     Tcl_MvCmd _ANSI_ARGS_((ClientData clientData,
  1009.             Tcl_Interp *interp, int argc, char **argv));
  1010. EXTERN int    Tcl_OpenCmd _ANSI_ARGS_((ClientData clientData,
  1011.             Tcl_Interp *interp, int argc, char **argv));
  1012. EXTERN int    Tcl_PackageCmd _ANSI_ARGS_((ClientData clientData,
  1013.             Tcl_Interp *interp, int argc, char **argv));
  1014. EXTERN int    Tcl_PidCmd _ANSI_ARGS_((ClientData clientData,
  1015.             Tcl_Interp *interp, int argc, char **argv));
  1016. EXTERN int    Tcl_ProcCmd _ANSI_ARGS_((ClientData clientData,
  1017.             Tcl_Interp *interp, int argc, char **argv));
  1018. EXTERN int    Tcl_PutsCmd _ANSI_ARGS_((ClientData clientData,
  1019.             Tcl_Interp *interp, int argc, char **argv));
  1020. EXTERN int    Tcl_PwdCmd _ANSI_ARGS_((ClientData clientData,
  1021.             Tcl_Interp *interp, int argc, char **argv));
  1022. EXTERN int    Tcl_ReadCmd _ANSI_ARGS_((ClientData clientData,
  1023.             Tcl_Interp *interp, int argc, char **argv));
  1024. EXTERN int    Tcl_RegexpCmd _ANSI_ARGS_((ClientData clientData,
  1025.             Tcl_Interp *interp, int argc, char **argv));
  1026. EXTERN int    Tcl_RegsubCmd _ANSI_ARGS_((ClientData clientData,
  1027.             Tcl_Interp *interp, int argc, char **argv));
  1028. EXTERN int    Tcl_RenameCmd _ANSI_ARGS_((ClientData clientData,
  1029.             Tcl_Interp *interp, int argc, char **argv));
  1030. EXTERN int    Tcl_ReturnCmd _ANSI_ARGS_((ClientData clientData,
  1031.             Tcl_Interp *interp, int argc, char **argv));
  1032. EXTERN int     Tcl_RmCmd _ANSI_ARGS_((ClientData clientData,
  1033.             Tcl_Interp *interp, int argc, char **argv));
  1034. EXTERN int     Tcl_RmdirCmd _ANSI_ARGS_((ClientData clientData,
  1035.             Tcl_Interp *interp, int argc, char **argv));
  1036. EXTERN int    Tcl_ScanCmd _ANSI_ARGS_((ClientData clientData,
  1037.             Tcl_Interp *interp, int argc, char **argv));
  1038. EXTERN int    Tcl_SeekCmd _ANSI_ARGS_((ClientData clientData,
  1039.             Tcl_Interp *interp, int argc, char **argv));
  1040. EXTERN int    Tcl_SetCmd _ANSI_ARGS_((ClientData clientData,
  1041.             Tcl_Interp *interp, int argc, char **argv));
  1042. EXTERN int    Tcl_SplitCmd _ANSI_ARGS_((ClientData clientData,
  1043.             Tcl_Interp *interp, int argc, char **argv));
  1044. EXTERN int    Tcl_SocketCmd _ANSI_ARGS_((ClientData clientData,
  1045.             Tcl_Interp *interp, int argc, char **argv));
  1046. EXTERN int    Tcl_SourceCmd _ANSI_ARGS_((ClientData clientData,
  1047.             Tcl_Interp *interp, int argc, char **argv));
  1048. EXTERN int    Tcl_StringCmd _ANSI_ARGS_((ClientData clientData,
  1049.             Tcl_Interp *interp, int argc, char **argv));
  1050. EXTERN int    Tcl_SubstCmd _ANSI_ARGS_((ClientData clientData,
  1051.             Tcl_Interp *interp, int argc, char **argv));
  1052. EXTERN int    Tcl_SwitchCmd _ANSI_ARGS_((ClientData clientData,
  1053.             Tcl_Interp *interp, int argc, char **argv));
  1054. EXTERN int    Tcl_TellCmd _ANSI_ARGS_((ClientData clientData,
  1055.             Tcl_Interp *interp, int argc, char **argv));
  1056. EXTERN int    Tcl_TimeCmd _ANSI_ARGS_((ClientData clientData,
  1057.             Tcl_Interp *interp, int argc, char **argv));
  1058. EXTERN int    Tcl_TraceCmd _ANSI_ARGS_((ClientData clientData,
  1059.             Tcl_Interp *interp, int argc, char **argv));
  1060. EXTERN int    Tcl_UnsetCmd _ANSI_ARGS_((ClientData clientData,
  1061.             Tcl_Interp *interp, int argc, char **argv));
  1062. EXTERN int    Tcl_UpdateCmd _ANSI_ARGS_((ClientData clientData,
  1063.             Tcl_Interp *interp, int argc, char **argv));
  1064. EXTERN int    Tcl_UplevelCmd _ANSI_ARGS_((ClientData clientData,
  1065.             Tcl_Interp *interp, int argc, char **argv));
  1066. EXTERN int    Tcl_UpvarCmd _ANSI_ARGS_((ClientData clientData,
  1067.             Tcl_Interp *interp, int argc, char **argv));
  1068. EXTERN int    Tcl_VwaitCmd _ANSI_ARGS_((ClientData clientData,
  1069.             Tcl_Interp *interp, int argc, char **argv));
  1070. EXTERN int    Tcl_WhileCmd _ANSI_ARGS_((ClientData clientData,
  1071.             Tcl_Interp *interp, int argc, char **argv));
  1072. EXTERN int    TclUnsupported0Cmd _ANSI_ARGS_((ClientData clientData,
  1073.             Tcl_Interp *interp, int argc, char **argv));
  1074.  
  1075. #endif /* _TCLINT */
  1076.